package com.taotao.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.taotao.database.mybatis.ReadOnlyConnection;
import com.taotao.mapper.DicTypeMapper;
import com.taotao.model.DicType;

@Service
public class DicTypeService {
	@Autowired
	private DicTypeMapper dicTypeMapper;

	@ReadOnlyConnection
	public List<DicType> getAll(DicType dicType) {
		if (dicType.getPage() != null && dicType.getRows() != null) {
			PageHelper.startPage(dicType.getPage(), dicType.getRows());
		}
		return dicTypeMapper.selectAll();
	}

}
